﻿using ShaderCompiler.Core;

namespace ShadersCS
{
	public sealed class Drop : Base
	{
		public Vector2 Location;

		[ShaderMethod(ShaderMethodTypes.VS)]
		public void mainVS()
		{
			Vector3 loc = new Vector3(Position_VS.xy + Location, Position_VS.z);
			Position_VSPS = new Vector4(loc, 1);
			Texcoord_VSPS = loc.xy;
		}

		[ShaderMethod(ShaderMethodTypes.PS)]
		public void mainPS()
		{
			double dis = SL.Distance(Location, Texcoord_VSPS);
			SL.Clip(.1 - dis);

			Color_PS = new Vector4(0, 0, 1, 1);
		}
	}
}
